package com.nlp.visualization.dao.impl.backend;

import com.nlp.visualization.dao.backend.IUserSuggestionsDao;
import com.nlp.visualization.dao.base.DaoSupportImpl;
import com.nlp.visualization.pojo.db.TUserSuggestions;
import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author LXM
 * @Title: NLPVisualizationTools
 * @Description:
 * @date 2018/5/10下午9:33
 */
@Repository
public class UserSuggestionsDaoImpl extends DaoSupportImpl<TUserSuggestions> implements IUserSuggestionsDao {


    @Override
    public List noDeal() {
        String sql = "SELECT *   FROM t_user_suggestions WHERE t_user_suggestions.type like '%【未处理】%' ";
        Query query = getSession().createSQLQuery(sql);
        List list = query.list();

        return list;
    }

    @Override
    public List yesDeal() {
        String sql = "SELECT *   FROM t_user_suggestions WHERE t_user_suggestions.type like '%【已处理】%' ";
        Query query = getSession().createSQLQuery(sql);
        List list = query.list();

        return list;
    }
}
